﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    
    xmlns:LunchRoller_ViewModels="clr-namespace:LunchRoller.ViewModels" x:Class="LunchRoller.Decide"
    mc:Ignorable="d" 	d:DataContext="{d:DesignData SampleData/MainViewModelSampleData.xaml}"
    d:DesignHeight="440" d:DesignWidth="440">
    <UserControl.Resources>

    </UserControl.Resources>

    <UserControl.FontFamily>
        <StaticResource ResourceKey="PhoneFontFamilyNormal"/>
    </UserControl.FontFamily>
    <UserControl.FontSize>
        <StaticResource ResourceKey="PhoneFontSizeNormal"/>
    </UserControl.FontSize>
    <UserControl.Foreground>
        <StaticResource ResourceKey="PhoneForegroundBrush"/>
    </UserControl.Foreground>

    <Grid  x:Name="LayoutRoot" d:DataContext="{d:DesignData /SampleData/MainViewModelSampleData.xaml}">

        <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="VisualStateGroup"/>
        </VisualStateManager.VisualStateGroups>
        <Grid Margin="22,22,8,8">
        	<Grid.ColumnDefinitions>
        		<ColumnDefinition Width="0.338*"/>
        		<ColumnDefinition Width="0.152*"/>
        		<ColumnDefinition Width="0.232*"/>
        		<ColumnDefinition Width="0.278*"/>
        	</Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="0.073*"/>
                <RowDefinition Height="0.132*"/>
                <RowDefinition Height="0.137*"/>
                <RowDefinition Height="0.102*"/>
                <RowDefinition Height="0.187*"/>
                <RowDefinition Height="0.369*"/>
            </Grid.RowDefinitions>
<Border Background="{StaticResource ItemSoildBackground}" Grid.ColumnSpan="4" Margin="8" Grid.RowSpan="3"></Border>
            <TextBlock TextWrapping="Wrap" FontSize="24" Foreground="{StaticResource ForeColor}" Margin="8,8,8,0" Grid.RowSpan="3" Height="139" VerticalAlignment="Top"  Text="饭醉分子" d:LayoutOverrides="GridBox, HorizontalMargin"  />
            <TextBlock TextWrapping="Wrap" FontSize="24" Foreground="{StaticResource ForeColor}" Margin="8,8,0,0" Text="预谋作案" Height="130" VerticalAlignment="Top" Grid.Row="3" Grid.RowSpan="2" />
            <ListBox  ItemsSource="{Binding Places}" FontSize="26.667" Foreground="{StaticResource ForeColor}" Margin="8" Grid.RowSpan="2" Grid.Row="3" Grid.ColumnSpan="3" ItemsPanel="{StaticResource WarpItemsPanelTemplate}" Background="{StaticResource ItemTransBackground}" Grid.Column="1">
                <ListBox.ItemTemplate>
                    <DataTemplate>                        <StackPanel Visibility="{Binding ChosenVisibility}" >
                        <TextBlock Margin="4,0,4,0" Text="{Binding Name}"  FontSize="28" TextDecorations="Underline"></TextBlock>
                    </StackPanel>
					</DataTemplate>
                </ListBox.ItemTemplate>

            </ListBox>
            <Button x:Name="button" Command="{Binding DecideCommand}" Foreground="{StaticResource ForeColor}" Style="{StaticResource PhoneButtonBase}" BorderBrush="#00000000" Canvas.ZIndex="2" HorizontalAlignment="Center" Width="207" Grid.ColumnSpan="2" Grid.Row="5" Background="{StaticResource ItemTransBackground}" Grid.Column="2" Margin="0,-4,0,0">
                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Top"><Run FontSize="48" Text="愿"/><Run Text="赌服输"/><LineBreak/><Run Text="不得反"/><Run FontSize="48" Text="悔"/></TextBlock>

            </Button>
            <Border Background="{StaticResource ItemSoildBackground}" Grid.ColumnSpan="4" Margin="8" Grid.RowSpan="2" Grid.Row="3" Canvas.ZIndex="-1" />
            <ListBox  ItemsSource="{Binding Person}" Foreground="{StaticResource ForeColor}" Grid.RowSpan="3" Margin="8" Grid.Column="1" Grid.ColumnSpan="3" ItemsPanel="{StaticResource WarpItemsPanelTemplate}" Background="{StaticResource ItemTransBackground}">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Visibility="{Binding ChosenVisibility}" >
                        <TextBlock Margin="4,0,4,0" Text="{Binding Name}" FontSize="28" TextDecorations="Underline" HorizontalAlignment="Right"></TextBlock>
                        </StackPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>

            </ListBox>
            <ListBox Margin="0,37,8,8" Grid.Row="5" Grid.ColumnSpan="2" SelectedIndex="{Binding Setting.LatestDistinctCount, FallbackValue=0, Mode=TwoWay, UpdateSourceTrigger=Default}" Background="{StaticResource ItemTransBackground}" Padding="8,4">
            	<ListBox.Items>
            		<ListBoxItem>从来吃不腻</ListBoxItem>        	
					<ListBoxItem>忽略上次目标</ListBoxItem>        	
					<ListBoxItem>忽略前两次目标</ListBoxItem>        	
					<ListBoxItem>忽略前三次目标</ListBoxItem>        	
					<ListBoxItem>忽略前四次目标</ListBoxItem>        	
					
				</ListBox.Items>         
			</ListBox>
            <TextBlock Height="30" Margin="18,3,-23,0" Grid.Row="5" TextWrapping="Wrap" Text="不嫌腻么" VerticalAlignment="Top"/>
	
          
        </Grid>

    </Grid>
</UserControl>
